from django.contrib.localflavor import us
from django.contrib.sites.managers import CurrentSiteManager
from django.contrib.sites.models import Site
from django.db import models
from django.utils.translation import ugettext_lazy as _

class Restaurant(models.Model):
    """A model of a restaurant."""
     name =                 models.CharField(_("Name"), max_length=255)
     site =                 models.ForeignKey(Site)
     description =          models.TextField(_("Description"), blank=True)
     address =              models.CharField(_("Address"))
     address_additional =   models.CharField(_("Address 2"), blank=True)
     city =                 models.CharField(_("City"))
     state =                us.models.USStateField(_("State"))
     zipcode =              models.CharField(_("Zipcode"), max_length=10)
     phone =                us.models.PhoneNumberField(_("Telephone"))
     fax =                  us.models.PhoneNumberField(_("Fax"), blank=True)
     email =                models.EmailField(_("Email"))
     
     on_site = CurrentSiteManager()
     
     class Meta:
        ordering = ['name']
    
    def __unicode__(self):
        return self.name    
    